home *** CD-ROM | disk | FTP | other *** search
- //
- // eSellerateObjC.h
- // eSellerate Static Library
- //
- // Created by Josh Ferguson on Mon Jul 15 2002.
- // Copyright (c) 2004 eSellerate. All rights reserved.
- //
-
- #define eSellerate_FALSE 0
- #define eSellerate_TRUE 1
- #define eSellerate_TRUE_ButNoManualActivation 2 /* additional value for use by ActivateSerialNumber */
-
- /* eSellerate_ErrorCode return values ***************************************************************/
- #define eSellerate_SUCCESS 0 /* returned if the function fulfills the action requested of it */
- #define eSellerate_FAILURE 1 /* returned if the function cannot fulfill the action requested of it */
- #define eSellerate_NOENGINE 2 /* returned if the Engine cannot be found */
- #define eSellerate_CANCELED 3 /* returned if the Engine was exited before the action was completed */
- #define eSellerate_NOUPDATE 4 /* returned by SilentCheckForUpdate if no update is available */
-
- typedef NSString * eSellerate_InputString;
- typedef NSString * eSellerate_OutputString;
- typedef NSURL * eSellerate_FileLocation;
-
- typedef Handle eSellerate_ResultData;
- typedef unsigned long eSellerate_ErrorCode;
- typedef BOOL eSellerate_TrueOrFalse; /* true if non-zero, false if zero */
-
- typedef short eSellerate_DaysSince2000;
-
- #define keSellerateProductIDKey @"ProductIDKey" // Key for Product ID in shopping cart, serial number, and file location dictionaries
- #define keSellerateSKUIDKey @"SKUIDKey" // Key for SKU ID in shopping cart dictionary
- #define keSellerateSerialNumberKey @"SerialNumberKey" // Key for serial number in the serial number dictionary
- #define keSellerateNameBasedKey @"NameBasedKey" // Key for the string used in a name-based key serial number
- #define keSellerateFileLocationKey @"FileLocation" // Key for file location in file location dictionary
-
- #import <Foundation/Foundation.h>
-
- @interface eSellerateObject : NSObject {
- eSellerate_ResultData resultData;
- }
- /* call on the Engine to perform a purchase ******************/
- - (eSellerate_ErrorCode)purchaseWithPublisherID:(eSellerate_InputString)publisherID /* publisher ID code (always needed) */
- eSellerID:(eSellerate_InputString)eSellerID /* eSeller ID code (always needed) */
- previewID:(eSellerate_InputString)previewID /* preview certificate ID code */
- errorURL:(eSellerate_InputString)errorURL /* URL to show in case of error */
- openingTitle:(eSellerate_InputString)openingTitle /* custom title of the opening page of the Wizard */
- openingText:(eSellerate_InputString)openingText /* custom first paragraph of the opening page of the Wizard */
- showFolder:(eSellerate_TrueOrFalse)showFolder /* have the Engine open a window to display downloaded files */
- trackingID:(eSellerate_InputString)trackingID /* tracking ID code */
- affiliateID:(eSellerate_InputString)affiliateID /* affiliate ID code */
- couponID:(eSellerate_InputString)couponID /* coupon ID code */
- activationID:(eSellerate_InputString)activationID /* activation ID code, to activate serial number */
- extraData:(eSellerate_InputString)extraData; /* extra information, for instance for custom serial numbers */
-
- /* call on the Engine to reinstall a previous purchase *******/
- - (eSellerate_ErrorCode)reinstallWithPublisherID:(eSellerate_InputString)publisherID /* publisher ID code (always needed) */
- eSellerID:(eSellerate_InputString)eSellerID /* eSeller ID code (always needed) */
- previewID:(eSellerate_InputString)previewID /* preview certificate ID code */
- errorURL:(eSellerate_InputString)errorURL /* URL to show in case of error */
- openingTitle:(eSellerate_InputString)openingTitle /* custom title of the opening page of the Wizard */
- openingText:(eSellerate_InputString)openingText /* custom first paragraph of the opening page of the Wizard */
- showFolder:(eSellerate_TrueOrFalse)showFolder /* have the Engine open a window to display downloaded files */
- trackingID:(eSellerate_InputString)trackingID /* tracking ID code */
- activationID:(eSellerate_InputString)activationID; /* activation ID code, to activate serial number */
-
- /* call on the Engine to check if an update is available *****/
- - (eSellerate_ErrorCode)checkForUpdateWithPublisherID:(eSellerate_InputString)publisherID /* publisher ID code (always needed) */
- eSellerID:(eSellerate_InputString)eSellerID /* eSeller ID code (always needed) */
- previewID:(eSellerate_InputString)previewID /* preview certificate ID code */
- errorURL:(eSellerate_InputString)errorURL /* URL to show in case of error */
- openingTitle:(eSellerate_InputString)openingTitle /* custom title of the opening page of the Wizard */
- openingText:(eSellerate_InputString)openingText /* custom first paragraph of the opening page of the Wizard */
- showFolder:(eSellerate_TrueOrFalse)showFolder /* have the Engine open a window to display downloaded files */
- trackingID:(eSellerate_InputString)trackingID /* tracking ID code */
- affiliateID:(eSellerate_InputString)affiliateID /* affiliate ID code */
- couponID:(eSellerate_InputString)couponID /* coupon ID code */
- activationID:(eSellerate_InputString)activationID /* activation ID code, to activate serial number */
- extraData:(eSellerate_InputString)extraData; /* extra information, for instance for custom serial numbers */
-
- /* check for an update without invoking the Wizard ***/
- - (eSellerate_ErrorCode)silentCheckForUpdateWithPublisherID:(eSellerate_InputString)publisherID /* publisher ID code (always needed) */
- eSellerID:(eSellerate_InputString)eSellerID /* eSeller ID code (always needed) */
- previewID:(eSellerate_InputString)previewID /* preview certificate ID code */
- trackingID:(eSellerate_InputString)trackingID /* tracking ID code */
- askToConnect:(eSellerate_TrueOrFalse)askToConnect; /* ask to connect when no active connection is found */
-
- /* call on the Engine to launch an update ********/
- - (eSellerate_ErrorCode)launchUpdateFile:(eSellerate_FileLocation)updaterFile /* location of file to launch (always needed) */
- fileToUpdate:(eSellerate_FileLocation)fileToUpdate; /* location of file to which to apply the update */
-
- /* Build an array of dictionaries to access Shopping Cart information */
- /* Each index of the NSArray contains a dictionary that has two keys: */
- /* keSellerateProductIDKey will give you the Product ID (NSString) */
- /* keSellerateSKUIDKey will give you the SKU ID (NSString) */
-
- - (NSArray *)indexShoppingCartData;
-
- /* Build an array of dictionaries to access Serial Number information **********************/
- /* Each index of the NSArray contains a dictionary that has three keys: */
- /* keSellerateProductIDKey will give you the Product ID (NSString) */
- /* keSellerateSerialNumberKey will give you the Serial Number (NSString) */
- /* keSellerateNameBasedKey will give you the name the serial number is based on (NSString) */
- - (NSArray *)indexSerialNumberData;
-
- /* Build an array of dictionaries to access File Location information **********************/
- /* Each index of the NSArray contains a dictionary that has two keys: */
- /* keSellerateProductIDKey will give you the Product ID (NSString) */
- /* keSellerateFileLocationKey will give you the downloaded file's location (NSURL) */
- - (NSArray *)indexFileLocationData;
-
- /* free memory allocated by the Engine */
- - (void)deleteResultData;
- /* confirm origin of serial number and lock it to hardware ************/
- - (eSellerate_ErrorCode)activateSerialNumberWithPublisherID:(eSellerate_InputString)publisherID /* publisher ID code (always needed) */
- activationID:(eSellerate_InputString)activationID /* activation ID code to associate with serial number (always needed) */
- serialNumber:(eSellerate_InputString)serialNumber /* serial number (always needed) */
- askToConnect:(eSellerate_TrueOrFalse)askToConnect; /* ask to connect when no active connection is found */
-
- /* additional failure codes:
- * -25000: unknown activationID
- * -25001: unknown serialNumber
- * -25002: improper usage
- * -25003: blacklisted serialNumber
- * -25004: invalid order
- * -25005: activation limit met
- */
-
- /* verify that serial number is activated and locked to hardware ****/
- - (eSellerate_ErrorCode)validateActivationWithPublisherID:(eSellerate_InputString)publisherID /* publisher ID code (always needed) */
- activationID:(eSellerate_InputString)activationID /* activation ID code associated with serial number (always needed) */
- serialNumber:(eSellerate_InputString)serialNumber; /* serial number (always needed) */
- /* additional failure codes:
- * -25006: unknown activationKey
- * -25007: hardware mismatch
- * -25008: invalid activationKey
- */
- /* confirm origin of serial number and lock it to hardware **************/
- - (eSellerate_ErrorCode)manualActivateSerialNumberWithPublisherID:(eSellerate_InputString)publisherID /* publisher ID code (always needed) */
- activationID:(eSellerate_InputString)activationID /* activation ID code to associate with serial number (always needed) */
- serialNumber:(eSellerate_InputString)serialNumber /* serial number (always needed) */
- titlePreface:(eSellerate_InputString)titlePreface /* custom text, to preface Wizard titles */
- otherOptions:(eSellerate_InputString)otherOptions; /* custom text, to include phone number, email address or other contact */
-
- - (eSellerate_ErrorCode)installEngine; /* install the Engine from resource to its proper system location */
-
- - (eSellerate_FileLocation)applicationLocation; /* determine file location of the application */
-
- - (eSellerate_ErrorCode)getLastErrorCode; /* give the last error detected in the Engine */
-
- - (eSellerate_DaysSince2000)validateSerialNumber:(eSellerate_InputString)serialNumber
- nameBasedKey:(eSellerate_InputString)nameBasedKey
- extraDataKey:(eSellerate_InputString)extraDataKey
- publisherKey:(eSellerate_InputString)publisherKey;
-
- - (eSellerate_DaysSince2000)eSellerateToday; /* days from 1/1/2000 to today */
-
- @end
-